<?php

namespace app\index\controller;

use app\common\controller\Frontend;
use app\common\library\Token;

class Index extends Frontend
{

    protected $noNeedLogin = '*';
    protected $noNeedRight = '*';
    protected $layout = '';

    public function _initialize()
    {
        parent::_initialize();
    }

    public function index()
    {
        return $this->view->fetch();
    }

    public function news()
    {
        $newslist = [];
        return jsonp(['newslist' => $newslist, 'new' => count($newslist), 'url' => 'https://www.fastadmin.net?ref=news']);
    }

    public function test(){
        $config = \think\Config::get('redis');
        $client = new \Predis\Client($config);
        $client->set('foo', 'barr');
        $value = $client -> get ( 'foo' ) ;
        dump($value);exit;
//        $this->success('',$value);

    }

    public function test1(){
//        $str = "452Y765f7u52q734guysdg7qi6RA87SDF";
        $str = "kzZZPH08pZl67ls8Ow9deiYhSK20nHYz";
        dump(strlen($str));exit;
    }

}
